import { useUserStore } from '@/store/user'


export const AuthDirectives = {
    name: 'auth',
    mounted(el, binding) {
        let permissions = useUserStore().permissions;
        let value = binding.value;
        if (permissions.includes("*:*:*")) return;
        if (permissions.includes(value)) return;
        if (value="upload") return;
        const parent = el.parentElement
        parent && parent.removeChild(el);
    },
}